package com.example.myproject.redis.redisother;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xi on 2019/3/2.
 */

@RestController
@RequestMapping("/redis")
public class RedisController {

    @Autowired
    private RedisService redisService;

    @RequestMapping("/publish")
    public String publish(){
        int index = 0;
        for(int i=0;i<index+2;i++){
            System.out.println("233333333333:" + i);
//            User user = new User();
//            user.setName("这是我的："+i+"条消息");
           // redisService.sendChannelMess("mytopic",user);
        }
        return "结束";
    }
}
